<!doctype html>
<html>
	<head id="top">
		<meta charset="UTF-8">
		<title>{{title}}</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../../css/inspection/common.css" />
		<link rel="stylesheet" href="../../../css/inspection/testDetail.css" />
		<script src="../../../js/vconsole.min.js"></script>
		<script src="../../../js/mui.min.js"></script>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="../../../js/vue.js"></script>
		<script src="../../../js/inspectionCmms.js"></script>
		<script type="text/javascript">
			window.onload = function(){
				//原生修改title的内容
				let url=location.href.split("?")[1];
				if(url){
					let code=url.split("&")[1].split("=")[1];
					let t = decodeURI(decodeURI(code)); 
					document.title=t;
				}
//				var top=new Vue({
//					el:'#top',
//					data(){
//						return{
//							title:''
//						}
//					},
//					mounted(){
//						let url=location.href.split("?")[1];
//						this.get(url);
//					},
//					methods:{
//						get:function(url){
//							let _this=this;
//							if(url){
//								let code=url.split("&")[1].split("=")[1];
//								let t = decodeURI(decodeURI(code)); 
//								_this.title=t;
//							}
//						}
//					}
//				});
				var test = new Vue({
					el:'#test',
					data:{
						title:'123',
						url:'https://api.test.lis.ulabcare.com/api/clinic-doctor/',
	//					url2:'https://lab.ulabcare.com/clinicalmall-web/',
						mlmsg:[],
						jsmsg:[],
						id:''
					},
					mounted(){
						let url = location.href.split('?')[1];
						this.getCode(url);
						this.loadPage(this.url);
					},
					methods:{
						//获取参数id
						getCode:function(url){
							let _this = this;
							if(url){
								let code = url.split('&')[0].split('=')[1];
								_this.id=code;
							}
						},
						//加载后台数据
						loadPage:function(url){
							let _this=this;
							let stateS = localStorage.getItem('stateS');
							console.log(stateS);
							mui.ajax(url+'jyzsApp/selectIntroductionById',{
								data:{
									id:this.id
								},
								dataType:'json',//服务器返回json格式数据
								type:'post',//HTTP请求类型
								headers:{'Content-Type':'application/json','token':localStorage.getItem(localStorage.getItem("state")+"_doctor_token")},
								success:function(res){
									//服务器返回响应，根据响应结果，分析；
									 console.log(res);
									if(res.code==0){
										_this.mlmsg=res.data;
										console.log(_this.mlmsg);
									}
								},
								error:function(xhr,type,errorThrown){
									//异常处理；
									console.log(type);
								}
							});
						}
					}
				})
			}
		</script>	
	</head>
	<body>
		<div id="test">
			<div class="mui-content gridBox" class="fromML" v-if="mlmsg">
				<div class="mui-row" v-if="mlmsg.name">
			        <div class="mui-col-xs-4 gridColLeft">项目名称:</div>
			        <div class="mui-col-xs-8 gridColRight">{{mlmsg.name}}</div>
			    </div>
			    <div class="mui-row" v-if="mlmsg.specimenSave">
			        <div class="mui-col-xs-4 gridColLeft">样品保存条件:</div>
			        <div class="mui-col-xs-8 gridColRight">{{mlmsg.specimenSave}}</div>
			    </div>
			    <div class="mui-row" v-if="mlmsg.samplingRequired">
			        <div class="mui-col-xs-4 gridColLeft">样本要求:</div>
			        <div class="mui-col-xs-8 gridColRight">{{mlmsg.samplingRequired}}</div>
			    </div>
			    <div class="mui-row" v-if="mlmsg.experimentalMethod">
			        <div class="mui-col-xs-4 gridColLeft">检测方法:</div>
			        <div class="mui-col-xs-8 gridColRight">{{mlmsg.experimentalMethod
}}</div>
			    </div>
			    <div class="mui-row" v-if="mlmsg.clinicalValue">
			        <div class="mui-col-xs-4 gridColLeft">临床意义:</div>
			        <div class="mui-col-xs-8 gridColRight">{{mlmsg.clinicalValue}}</div>
			    </div>
			     <div class="mui-row" v-if="mlmsg.reportTime">
			        <div class="mui-col-xs-4 gridColLeft">报告时间:</div>
			        <div class="mui-col-xs-8 gridColRight">{{mlmsg.reportTime}}</div>
			    </div>
			</div>
		</div>
	</body>
</html>